<select id="state" class="register_option">
    <!--<option value="" disabled selected>--Please choose--</option>-->
    <% if (typeof(search) !== 'undefined') { %>
    <option value=""> Any where </option>
    <% } %>
    <% for (var i in arr) {%>
        <% if (typeof(val)!=='undefined') {%>
            <% if(parseInt(val) == parseInt(arr[i].value)) {%>
            <option val="<%=arr[i].label%>"  value=<%=arr[i].value%> selected = "true"> <%=arr[i].label%></option>
            <% } else {%>
            <option  val="<%=arr[i].label%>"  value=<%=arr[i].value%>> <%=arr[i].label%></option>
            <% } %> 
        <% } else {%>
            <option  val="<%=arr[i].label%>"  value=<%=arr[i].value%>> <%=arr[i].label%></option>
        <% } %>
    <% }%>
</select>     
